/**
 * Created by karl.zheng on 2018/1/8.
 */
var path = require('path');

module.exports = {
	entry: './index.js',

	output: {
		filename: 'sdkV3.js',
		path: path.join(__dirname, "dist"),
		// publicPath: 'http://sdk-test.changic.net.cn:8191/sdk-demo/'
	},

	module: {
		rules: [{
				test: /\.js$/,
				exclude: /(node_modules|bower_components)/,
				use: {
					loader: 'babel-loader',
					options: {
						presets: ['babel-preset-es2015', 'babel-preset-react']
					}
				}
			},
			{
				test: /\.css$/,
				use: ['style-loader', 'css-loader']
			},
			{
				test: /\.scss$/,
				use: ['style-loader', 'css-loader', 'sass-loader']
			},
			{
				test: /\.less$/,
				use: ['style-loader', 'css-loader', 'less-loader']
			},
			{
				test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/,
				use: [{
					loader: 'file-loader',
					options: {
						name: 'img/[name].[ext]',
					}
				}]
			}
		]
	},

	devServer: {
		inline: true,
		port: 5005
	}
}